/**
 * Copyright (c) Salomon Automation GmbH
 */
package ro.cuzma.larry.bookscollection.md;

import ro.cuzma.larry.persistance.common.Entity;
import ro.cuzma.larry.persistance.common.EntityIdAndValue;
import ro.cuzma.larry.persistance.common.EntityList;

public class Library extends Entity<String> {

    private String                               name;
    private String                               root;
    private EntityList<EntityIdAndValue<String>> languages = new EntityList<EntityIdAndValue<String>>();
    private EntityList<EntityIdAndValue<String>> formats   = new EntityList<EntityIdAndValue<String>>();
    private EntityList<EntityIdAndValue<String>> types     = new EntityList<EntityIdAndValue<String>>();
    private EntityList<Entity<String>>           series    = new EntityList<Entity<String>>();
    private EntityList<Book>                     books     = new EntityList<Book>();
    private EntityList<Author>                   authors   = new EntityList<Author>();

    public Library(String name, String root) {
        this.name = name;
        this.root = root;
    }

    public Library() {
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAuthors(EntityList<Author> authors) {
        this.authors = authors;
    }

    public void setBooks(EntityList<Book> books) {
        this.books = books;
    }

    public String getName() {
        return name;
    }

    public EntityList<Author> getAuthors() {
        return authors;
    }

    public EntityList<Book> getBooks() {
        return books;
    }

    public void addBook(Book book) {
        books.add(book);
    }

    public void addAuthor(Author author) {
        authors.add(author);
    }

    public String getRoot() {
        return root;
    }

    public void setRoot(String root) {
        this.root = root;
    }

    public EntityList<EntityIdAndValue<String>> getLanguages() {
        return languages;
    }

    public void setLanguages(EntityList<EntityIdAndValue<String>> languages) {
        this.languages = languages;
    }

    public EntityList<EntityIdAndValue<String>> getFormats() {
        return formats;
    }

    public void setFormats(EntityList<EntityIdAndValue<String>> formats) {
        this.formats = formats;
    }

    public EntityList<EntityIdAndValue<String>> getTypes() {
        return types;
    }

    public void setTypes(EntityList<EntityIdAndValue<String>> types) {
        this.types = types;
    }

    public EntityList<Entity<String>> getSeries() {
        return series;
    }

    public void setSeries(EntityList<Entity<String>> series) {
        this.series = series;
    }

}
